package com.molichuxing.gateway.api.services;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.result.ResponseResult;
import com.molichuxing.gateway.bff.dealer.entity.request.create.FenceCreateVo;
import com.molichuxing.gateway.bff.dealer.entity.request.modify.FenceModifyVo;
import com.molichuxing.gateway.bff.dealer.entity.response.FenceVo;
import com.molichuxing.gateway.bff.stock.entity.request.create.EntrepotStorageCreateVo;
import com.molichuxing.gateway.bff.stock.entity.request.modify.EntrepotStorageModifyVo;
import com.molichuxing.gateway.bff.stock.entity.request.modify.StockCarModifyVo;
import com.molichuxing.gateway.bff.stock.entity.response.EntrepotStorageBaseVo;
import com.molichuxing.gateway.bff.stock.entity.response.EntrepotStorageVo;
import com.molichuxing.gateway.bff.stock.entity.response.FenceBaseVo;
import com.molichuxing.gateway.bff.stock.entity.response.StockCarDetailVo;
import com.molichuxing.gateway.bff.stock.entity.response.StockCarStockVo;
import com.molichuxing.gateway.bff.stock.entity.response.StockCarVo;
import com.molichuxing.gateway.bff.stock.entity.response.StockRecordBaseVo;
import com.molichuxing.gateway.bff.stock.entity.response.StockRecordVo;

/**
 * 
 * @author liyg
 * 库存车辆web接口
 * 2019-08-26
 *
 */
public interface StockApiService {

	/**
	 * 获取库存列表
	 * @param
	 * @return
	 */
	ResponseResult<Paged<StockCarVo>> getStockCarList(Map<String, Object> map);

	/**
	 *获取库存记录列表
	 * @param
	 * @return
	 */
	ResponseResult<Paged<StockRecordVo>> getStockRecordList(Map<String, Object> map);

	/**
	 * 车辆入库信息
	 * @param modifyInStock
	 * @return
	 * 
	 */
	ResponseResult<Boolean> modifyInStock(StockCarModifyVo modifyVo);

	/**
	 * 车辆出库信息
	 * @param modifyVo
	 * @return
	 */
	ResponseResult<Boolean> modifyOutStock(StockCarModifyVo modifyVo);

	/**
	 * 确认回库信息
	 * @param modifyVo
	 * @return
	 */
	ResponseResult<Boolean> modifyCollectStoreStock(StockCarModifyVo modifyVo);

	/**
	 * 收车 车到中转库
	 * @param modifyVo
	 * @return
	 */
	ResponseResult<Boolean> modifyCollectStock(StockCarModifyVo modifyVo);

	/**
	 * 获取库存车辆出库详情
	 * @param carId
	 * @return
	 */
	ResponseResult<StockCarVo> getStockCar(Integer carId);

	/**
	 *获取库存车辆出库详情
	 * @param
	 * @return
	 */
	ResponseResult<StockCarDetailVo> getStockCarDetail(Integer carId);

	/**
	 * 获取中转库列表
	 * @param map
	 * @return
	 */
	ResponseResult<Paged<EntrepotStorageVo>> getEntrepotStorageList(Map<String, Object> map);

	/**
	 *获取中转库详
	 * @param
	 * @return
	 */
	ResponseResult<EntrepotStorageVo> getEntrepotStorage(Integer id);

	/**
	 * 保存中转库信息
	 * @param createVo
	 * @return
	 */
	ResponseResult<Boolean> create(EntrepotStorageCreateVo createVo);

	/**
	 * 修改中转库信息
	 * @param modifyVo
	 * @return
	 */
	ResponseResult<Boolean> modify(EntrepotStorageModifyVo modifyVo);

	/**
	 * 获取中转库下拉列表
	 * @return
	 */
	ResponseResult<List<EntrepotStorageVo>> getList();
	
	/**
	 * 获取中转库下拉列表
	 * @return
	 */
	ResponseResult<List<EntrepotStorageVo>> getLists();

	/**
	 *根据车辆id获取库存历史流转记录 
	 * @param carId
	 * @return
	 */
	ResponseResult<List<StockRecordBaseVo>> getListByCarId(Integer carId);

	/**
	 * 获取车辆库存列表（new）
	 * @param map
	 * @return
	 */
	ResponseResult<Paged<StockCarStockVo>> getStockCarPage(Map<String, Object> map);
	
	
	/**
	 * 模糊查询中转库或门店信息
	 * @param map
	 * @return
	 */
	ResponseResult<List<EntrepotStorageBaseVo>> getEntrepotOrStore(Map<String, Object> map);

	/**
	 * 获取库存列表导出
	 * @param request
	 * @param response
	 * @param map
	 */
	void getStockCarDownloadList(HttpServletRequest request, HttpServletResponse response, Map<String, Object> map);

	/**
	 * 根据门店或者中转库  id 查询 围栏数据
	 * @param map
	 * @return
	 */
	ResponseResult<List<FenceBaseVo>> getEntrepotOrStoreFence(Map<String, Object> map);

	/**
	 * 获取库存列表导出查询
	 * @param request
	 * @param response
	 * @param map
	 * @return
	 */
	ResponseResult<Boolean> getStockCarDownloadListQuery(HttpServletRequest request, HttpServletResponse response,
			Map<String, Object> map);

	/**
	 * 获取已有围栏列表
	 *
	 * @param storeId
	 * @return
	 */
	public ResponseResult<List<FenceVo>> getBindingFenceList(Integer storeId);

	/**
	 * 获取未绑定围栏列表
	 *
	 * @param storeId
	 * @return
	 */
	public ResponseResult<List<FenceVo>> getUnBindingFenceList(Integer storeId);

	/**
	 * 解除围栏
	 *
	 * @param fenceModifyVo
	 * @return
	 */
	public ResponseResult<Boolean> deleteFence(FenceModifyVo fenceModifyVo);

	/**
	 * 添加围栏
	 *
	 * @param fenceCreateVo
	 * @return
	 */
	public ResponseResult<Boolean> createFence(FenceCreateVo fenceCreateVo);

}
